/*
 * PopupInvitationMsg.hpp
 *
 *  Created on: Sep 12, 2012
 *      Author: guillou
 */

#ifndef POPUPINVITATIONMSG_HPP_
#define POPUPINVITATIONMSG_HPP_

#include <PopupLibTypes.hpp>
#include "PopupAbstractMessage.hpp"

namespace Popup
{
  struct ThreadInvitationMsg : public AbstractMessage, public ThreadInvitation
  {
    enum
    {
      THREAD_ID,
      THREAD_TITLE,
      INVITER_ID,
      CC_TARGETS,
      INVITED_USERS_ID
    };

    //! Constructor used in order to send a message
    ThreadInvitationMsg(const ThreadInvitation & p_invitation)
     : AbstractMessage(POPUP_MSG_TYPE_INVITATION),
       ThreadInvitation(p_invitation) {}

    //! Constructor used in order to receive a message
    ThreadInvitationMsg(const Message *p_message);

    virtual ~ThreadInvitationMsg() {}

    //! @Override
    bool onSend();

    //! @Override
    bool onReceive();
  };
}

#endif /* POPUPINVITATIONMSG_HPP_ */
